#pragma GCC optimize(2, "Ofast", "inline")
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
using namespace std;
const int MOD = 998244353;
const int MXN = 2e5 + 5;

int a,b;
char c;
signed main()
{
    // 输入输出优化
    cin.tie(0)->sync_with_stdio(0);
    cout.tie(0);
    cin>>a>>c>>b;
    b++;
    if(b>8) a++,b=1;
    cout<<a<<"-"<<b;
    return 0;
}